<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2015-2016 The CyanogenMod Project
                   2017-2023 The LineageOS Project
     Copyright (C) 2023 Paranoid Android

     SPDX-License-Identifier: Apache-2.0
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="org.lineageos.settings"
    android:versionCode="4"
    android:versionName="4.0"
    android:sharedUserId="android.uid.system">

    <uses-permission android:name="android.permission.ACCESS_SURFACE_FLINGER" />
    <uses-permission android:name="android.permission.GET_TASKS" />
    <uses-permission android:name="android.permission.DEVICE_POWER" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="android.permission.CAMERA_OPEN_CLOSE_LISTENER" />
    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
    <uses-permission android:name="android.permission.VIBRATE" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.DEVICE_POWER" />

    <protected-broadcast android:name="com.android.systemui.doze.pulse" />

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:persistent="true"
        android:theme="@style/Theme.SubSettingsBase"
        android:defaultToDeviceProtectedStorage="true"
        android:directBootAware="true">

        <receiver
            android:name=".BootCompletedReceiver"
            android:exported="true">
            <intent-filter android:priority="1000">
                <action android:name="android.intent.action.BOOT_COMPLETED" />
                <action android:name="android.intent.action.LOCKED_BOOT_COMPLETED" />
            </intent-filter>
        </receiver>

        <activity
            android:name=".dolby.DolbyActivity"
            android:label="@string/dolby_title"
            android:exported="true">
            <intent-filter>
                <action android:name="com.android.settings.action.IA_SETTINGS" />
                <action android:name="android.service.quicksettings.action.QS_TILE_PREFERENCES"/>
            </intent-filter>
            <intent-filter>
                <action android:name="android.media.action.DISPLAY_AUDIO_EFFECT_CONTROL_PANEL" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.CATEGORY_CONTENT_MUSIC" />
            </intent-filter>
            <meta-data android:name="com.android.settings.category"
                       android:value="com.android.settings.category.ia.sound" />
            <meta-data android:name="com.android.settings.summary_uri"
                       android:value="content://org.lineageos.settings.device.summary/dolby" />
        </activity>

        <service
            android:name=".dolby.DolbyTileService"
            android:icon="@drawable/ic_dolby_qs"
            android:label="@string/dolby_title"
            android:permission="android.permission.BIND_QUICK_SETTINGS_TILE"
            android:exported="true">
            <intent-filter>
                <action android:name="android.service.quicksettings.action.QS_TILE"/>
            </intent-filter>
        </service>

        <activity
            android:name=".doze.DozeSettingsActivity"
            android:label="@string/ambient_display_title"
            android:exported="true">
            <intent-filter>
                <action android:name="org.lineageos.settings.device.DOZE_SETTINGS" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>

        <activity
            android:name=".speaker.ClearSpeakerActivity" 
            android:label="@string/clear_speaker_title"
            android:exported="true">
            <intent-filter>
                <action android:name="com.android.settings.action.IA_SETTINGS" />
            </intent-filter>
            <meta-data
                android:name="com.android.settings.category"
                android:value="com.android.settings.category.ia.sound" />
            <meta-data
                android:name="com.android.settings.summary"
                android:resource="@string/clear_speaker_summary" />
        </activity>

        <activity
            android:name=".thermal.ThermalSettingsActivity"
            android:label="@string/thermal_title"
            android:icon="@drawable/ic_thermal_settings"
            android:exported="true">
            <intent-filter>
                <action android:name="com.android.settings.action.IA_SETTINGS" />
            </intent-filter>
            <meta-data
                android:name="com.android.settings.category"
                android:value="com.android.settings.category.ia.battery" />
            <meta-data
                android:name="com.android.settings.summary"
                android:resource="@string/thermal_summary" />
            <meta-data
                android:name="com.android.settings.order"
                android:value="1" />
        </activity>

        <activity
            android:name=".gestures.FpDoubleTapActivity"
            android:label="@string/fp_double_tap_title"
            android:exported="true">
            <intent-filter>
                <action android:name="com.android.settings.action.IA_SETTINGS" />
            </intent-filter>
            <meta-data android:name="com.android.settings.category"
                       android:value="com.android.settings.category.ia.gestures" />
            <meta-data android:name="com.android.settings.summary_uri"
                       android:value="content://org.lineageos.settings.device.summary/fp_double_tap" />
        </activity>

        <activity
            android:name=".refreshrate.RefreshActivity"
            android:label="@string/refresh_title"
            android:exported="true">
            <intent-filter>
                <action android:name="com.android.settings.action.IA_SETTINGS" />
            </intent-filter>
            <meta-data
                android:name="com.android.settings.category"
                android:value="com.android.settings.category.ia.display" />
            <meta-data
                android:name="com.android.settings.summary"
                android:resource="@string/refresh_summary" />
        </activity>

        <service
            android:name=".refreshrate.RefreshTileService"
            android:icon="@drawable/ic_qs_refresh_rate"
            android:label="@string/refresh_title"
            android:permission="android.permission.BIND_QUICK_SETTINGS_TILE"
            android:exported="true">
            <intent-filter>
                <action android:name="android.service.quicksettings.action.QS_TILE"/>
            </intent-filter>
        </service>

        <provider
            android:name=".SummaryProvider"
            android:authorities="org.lineageos.settings.device.summary">
        </provider>

        <service
            android:name=".thermal.ThermalService"
            android:exported="true"
            android:permission="ThermalService">
        </service>

        <service
            android:name=".doze.DozeService"
            android:exported="true"
            android:permission="DozeService">
        </service>

        <service
            android:name=".doze.PocketService"
            android:exported="true"
            android:permission="PocketService">
        </service>

        <service
            android:name=".display.ColorService"
            android:exported="true"
            android:permission="ColorService">
        </service>

        <service
            android:name=".camera.NfcCameraService"
            android:exported="true"
            android:permission="NfcCameraService">
        </service>

        <service
            android:name=".doze.AodBrightnessService"
            android:exported="true"
            android:permission="AodBrightnessService">
        </service>

        <service
            android:name=".refreshrate.RefreshService"
            android:exported="true"
            android:permission="RefreshService">
        </service>

        <service
            android:name=".touch.HighTouchPollingService"
            android:permission="HighTouchPollingService">
        </service>

        <service
            android:name=".touch.TouchOrientationService"
            android:permission="TouchOrientationService">
        </service>

    </application>
</manifest>
